package inits

import (
	"github.com/spf13/viper"
	"log"
	"resr_fun-api/basic/config"
)

func InitConfig() {
	viper.SetConfigFile("../../resr_fun-api/dev.yaml")
	err := viper.ReadInConfig()
	if err != nil {
		log.Println("配置文件读取失败", err)
		return
	}
	err = viper.Unmarshal(&config.Conf)
	if err != nil {
		log.Println("配置文件解析失败", err)
		return
	}
}
